
import 'package:flutter/material.dart';
import '../../../r.dart';
import '../bean/ui_const_bean.dart';

class ToolEmptyWidget extends StatelessWidget {

  final Function() onAddToolTap;

  ToolEmptyWidget(this.onAddToolTap);

  @override
  Widget build(BuildContext context) {
    return Container(
        height: UIConstBean.ToolEmptyH+20,
        decoration: const BoxDecoration(
          color: Colors.transparent,
          border: Border(top: BorderSide(width: 0.0)),
        ),
        child: Stack(
          children: <Widget>[
            Container(
              width: double.infinity,
              height: 90,
              color:Color(0xff3274F9),
            ),
            GestureDetector(
              child:Container(
                margin:const EdgeInsets.only(left:16.0,top: 10.0,right: 16),
                padding:const EdgeInsets.only(left:12,right: 12,top: 16),
                decoration:  BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(UIConstBean.CircularRadius),
                ),
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.start,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: <Widget>[
                    Text('常用工具',
                      style: TextStyle(color: Color(0xff333333),
                          fontSize: 18,fontWeight: FontWeight.w600),
                    ),
                    SizedBox(height: 25,),
                    Center(
                      child: Image.asset( R.imagesHomeHomeAddToolPng ,width: 118,height: 40,fit:BoxFit.fill,),
                    ),
                    SizedBox(height: 16,),
                    Center(
                      child:Text('您还没有常用工具，点击添加工具',
                        textAlign: TextAlign.center,
                        style: TextStyle(color: Color(0xff999999),
                            fontSize: 13,fontWeight: FontWeight.normal),
                      ),
                    ),
                  ],
                ),
              ),
              onTap: (){
                if(onAddToolTap!= null) {
                  onAddToolTap();
                }
              },
            ),
          ],
        )
    );
  }
}